//
// Created by rebeater on 2021/1/5.
//

#ifndef STIM300_DECODER_IMU_DECODER_H
#define STIM300_DECODER_IMU_DECODER_H

#include "nav_struct.h"




enum STIM300_FORMAT {
    RATE = 0x90,
    RATE_ACCE = 0x91,
    RATE_INC = 0x92,
    RATE_ACCE_INC = 0x93,
    RATE_TEMP = 0x94,
    /*todo*/
};


class Stim300 {
    int rate;
    double g;
    std::string header;

    ImuData decode(uint8_t buffer[], uint8_t header = 0x91);
public:
    bool decode_file(char in_file[],char out_file[]);
public:
    Stim300(int Rate, double g);
};

class WitMpu9250{
    int rate;
    double g;
private:
    static short decode_byte_to_int(const uint8_t buffer[2]);
public:
    bool decode_file(char in_file[],char out_file[]);
public:
    WitMpu9250(int rate,double g);

};


#endif //STIM300_DECODER_IMU_DECODER_H
